package com.nowcoder.community.dao;

public interface EntityLikeDao {
    void like(int entityType, int entityId, int userId, int userIdOfEntity);

    void unlike(int entityType, int entityId, int userId, int userIdOfEntity);

    int selectEntityLikeCount(int entityType, int entityId);

    int selectUserLikeCount(int userId);

    /**
     * 查询某实体对象是否已被用户点赞
     */
    boolean isUserLike(int userId, int entityType, int entityId);

    /**
     * 查询用户对某实体对象的点赞状态
     */
    int getLikeStatus(int userId, int entityType, int entityId);
}
